@extends('layouts.layout')

@section('header')

    <title>我的余额</title>

    <link rel="stylesheet" href="{{URL::asset('static/css/money.css')}}">

@endsection

@section('content')
    <div class="main">
    	<div class="all">
    		<div class="tit">账户余额</div>
    		<div class="money">
    			<span><i style="font-size: .5rem;">￥</i>{{ $money }}</span>
    			<p class="tx">提现<img style="height: .2rem;width: auto;margin-left: .1rem;" src="{{URL::asset('static/img/right1.png')}}" ></p>
    		</div>
    		<div class="tip">
    			<p>已提现：￥{{ $take }}</p>
    			<p>待入账：￥{{ $wait }}</p>
    		</div>
    	</div>
    	<div class="list">
    		<div class="tit">收益明细</div>
    		<ul>
                @isset($datas)
                    @foreach($datas as $data)
                        <li>
                            <div class="lefts">
                                @if ($data->status == 1 || $data->status == 2 || $data->status == 3)
                                    <p>奖励</p>
                                    @if($data->status == 1)
                                        <span>入账中...</span>
                                    @elseif ($data->status == 2)
                                        <span>订单未完成</span>
                                    @else
                                        <span>邀请成功</span>
                                    @endif

                                @elseif ($data->status == 4)
                                    <p>提现</p>
                                    <span>提现成功</span>
                                @else
                                    <p>未知</p>
                                    <span>未知来源</span>
                                @endif
                            </div>
                            <div style="text-align: right;">
                                @if($data->status == 1)
                                    <p class="up">+<i>{{ $data->money }}</i></p>
                                    <span> {{ $data->created_at }}</span>
                                @elseif ($data->status == 2)
                                    <p class="down"><i>{{ $data->money }}</i></p>
                                    <span> {{ $data->created_at }}</span>
                                @elseif ($data->status == 3)
                                    <p class="up">+<i>{{ $data->money }}</i></p>
                                    <span> {{ $data->created_at }}</span>
                                @else
                                    <p class="down">-<i>{{ $data->money }}</i></p>
                                    <span> {{ $data->created_at }}</span>
                                @endif

                            </div>
                        </li>
                    @endforeach
{{--                    <li>--}}
{{--                        <div class="lefts">--}}
{{--                            <p>奖励</p>--}}
{{--                            <span>邀请成功</span>--}}
{{--                        </div>--}}
{{--                        <div style="text-align: right;">--}}
{{--                            <p class="up">+<i>200</i></p>--}}
{{--                            <span>6-30 20:00</span>--}}
{{--                        </div>--}}
{{--                    </li>--}}
{{--                    <li>--}}
{{--                        <div class="lefts">--}}
{{--                            <p>提现</p>--}}
{{--                            <span>成功提现</span>--}}
{{--                        </div>--}}
{{--                        <div style="text-align: right;">--}}
{{--                            <p class="down">-<i>200</i></p>--}}
{{--                            <span>6-30 20:00</span>--}}
{{--                        </div>--}}
{{--                    </li>--}}

                @endisset

    		</ul>
    	</div>
    </div>

@endsection

@section('script')
    <script>
    	$(function(){
    		$('.tx').click(function(){
				layer.open({
				    content: '正在紧急开发中!'
				    ,skin: 'msg'
				    ,time: 1
				  });
    		})
    	})
    </script>
@endsection
